﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using Common.BaseLibrary.Authorization
@model List<DepartmentWork.Model.UserTaskViewModel>
<!--引用百度地图API-->
<style type="text/css">
    ul > .active {
        font-weight: bold;
    }

    html, body {
        margin: 0;
        padding: 0;
    }

    .iw_poi_title {
        color: #CC5522;
        font-size: 14px;
        font-weight: bold;
        overflow: hidden;
        padding-right: 13px;
        white-space: nowrap;
    }

    .iw_poi_content {
        font: 12px arial,sans-serif;
        overflow: visible;
        padding-top: 4px;
        white-space: -moz-pre-wrap;
        word-wrap: break-word;
    }
</style>
@*<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
<script>

 


</script>*@

<div class="page-header">
    <div class="pull-left">
        <ol class="breadcrumb visible-sm visible-md visible-lg">
            <li><a href="index.html"><i class="icon fa fa-home"></i>主页</a></li>

        </ol>
    </div>

</div>

<div class="col-md-12 col-xs-12">
    <div class="panel bk-widget bk-border-off">
        <div class="panel-body text-left bk-bg-primary bk-fg-white bk-padding-top-10 bk-padding-bottom-10">
            @{
                if (ViewBag.Info != "")
                {
                <div class="alert alert-info">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    <strong>说明：&emsp;@ViewBag.Info</strong>
                </div>
                }
            }


            <div class="row">
                <div class="col-xs-4 bk-vcenter">
                    <div class="bk-avatar">
                        @*                        <img src="@Url.Content("~/Assets/img/logo.png")" alt="" class="img-circle bk-img-80 bk-border-white bk-border-3x">*@
                        <h4 class="bk-margin-off">@CurrentUser.UserName</h4>
                        <small>@CurrentUser.Department</small>
                    </div>
                </div>
                <div class="col-xs-8 text-right bk-vcenter">
                    <div class="bk-margin-top-10">
                     @*   <button type="button" class="bk-margin-5 btn btn-default btn-info">查看更多</button>*@
                    </div>
                </div>
            </div>
        </div>
        <div class="panel-body bk-bg-white no-padding">

            <div class="tabs">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="#overview" data-toggle="tab">我的代办</a>
                    </li>

                </ul>
                <div class="tab-content">
                    <div id="overview" class="tab-pane active">
                        <div class="panel-body">
                            <div class="todo-list">
                                <ul id="todo-1" class="todo-list-tasks ui-sortable">
                                    @for (int i = 0; i < this.Model.Count(); i++)
                                    {
                                        var item = this.Model[i];
                                        <li>
                                            <label class="custom-checkbox-item pull-left">
                                                <input class="custom-checkbox" type="checkbox">
                                                <span class="custom-checkbox-mark"></span>
                                            </label>
                                            <span class="desc">
                                                @{if (item.Type == "BUG")
                                                  {
                                                    @:【@item.Type】&nbsp; <a  data-target="#BugInfoModal" onclick="ShowBugInfoModal('@item.TaskId')"   data-toggle="modal" style="color: black" >@item.Title</a>   &emsp;  @item.CreateTime.ToString("yyyy-MM-dd")
                                                  }
                                                  if (item.Type == "任务")
                                                  {
                                                    @:【@item.Type】&nbsp; <a  data-toggle="modal" onclick="ShowTaskInfoModal('@item.TaskId')" data-target="#TaskInfoModal" style="color: black" > @item.Title </a> &emsp;  @item.CreateTime.ToString("yyyy-MM-dd")
                                                    }

                                                  if (item.Type == "科室工作")
                                                  {
                                                    @:【@item.Type】&nbsp; <a  data-toggle="modal" onclick="ShowWorkModal('@item.TaskId')" data-target="#work_C" style="color: black" > @item.Title </a> &emsp;  @item.CreateTime.ToString("yyyy-MM-dd")
                                                    }
                                                  if (item.Type == "运维工作")
                                                  {
                                                    @:【@item.Type】&nbsp; <a  data-toggle="modal" onclick="appopsid('@item.TaskId')" data-target="#appops_C" style="color: black" > @item.Title </a> &emsp;  @item.CreateTime.ToString("yyyy-MM-dd")
                                                    }
                                                  if (item.Type == "加班申请")
                                                  {
                                                    @:【@item.Type】&nbsp; <a  data-toggle="modal" onclick="getid('@item.TaskId')" data-target="#worktime_C" style="color: black" > @item.Title </a> &emsp;  @item.CreateTime.ToString("yyyy-MM-dd")
                                                    }
                                                  if (item.Type == "请假申请")
                                                  {
                                                    @:【@item.Type】&nbsp; <a  data-toggle="modal" onclick="leaveid('@item.TaskId')" data-target="#leave_C" style="color: black" > @item.Title </a> &emsp;  @item.CreateTime.ToString("yyyy-MM-dd")
                                                    }
                                                }
                                            </span>
                                        </li>
                                    }



                                </ul>
                                @{
                                    if (this.Model.Count() != 0)
                                    {
                                    <div class="header">已阅读的代办</div>
                                    <ul class="completed"></ul>
                                    }
                                }
                            </div>

                        </div>
                    </div>
                </div>

            </div>
        </div>

    </div>
</div>


<div class="col-md-12 col-xs-12">
    <div class="panel bk-widget bk-border-off bk-noradius">
        <div class="panel-heading bk-bg-primary">
            <div class="row">
                <div class="col-xs-8 text-left bk-vcenter">
                    <h6 class="bk-margin-off">最新项目管理动态</h6>
                </div>
                <div class="col-xs-4 bk-vcenter text-right">
                </div>
            </div>
        </div>

        <div class="tab-content">
            <div class="table-responsive">
                <table class="table table-hover" style="text-align: center">
                    <thead>
                        <tr>
                            <th style="width: 20%; text-align: center">记录时间</th>
                            <th style="width: 55%; text-align: left;">记录概要</th>
                            <th style="width: 25%; text-align: left;">项目名称</th>
                            
                        </tr>
                    </thead>
                    <tbody>
                        @{
                            List<DepartmentWork.Model.NewInfoModel> listOfProjectManageInfo = (List<DepartmentWork.Model.NewInfoModel>)ViewBag.ListOfProjectManageInfo;
                            if (listOfProjectManageInfo.Count != 0)
                            {
                                for (int i = 0; i < listOfProjectManageInfo.Count; i++)
                                {
                                    var item = listOfProjectManageInfo[i];
                                    <tr>
                                        <td style="color: black">@item.CreateTime.ToString("yyyy-MM-dd")</td>
                                        <td style="text-align: left"><a  style="color:cornflowerblue" onclick="ShowWorkReocredInfoModal('@item.Info_Id')" data-toggle="modal" data-target="#WorkReocredInfoModal">@Html.SubString(item.Content)</a></td>
                                        <td style="color: black;text-align: left">@Html.SubString(item.ProjectName)</td>
                                        
                              
                                    </tr>
                                }
                            }
                        }

                    </tbody>
                </table>
            </div>
        </div>

        
    </div>
</div>

<div class="col-md-12 col-xs-12">
    <div class="panel bk-widget bk-border-off bk-noradius">
        <div class="panel-heading bk-bg-primary">
            <div class="row">
                <div class="col-xs-8 text-left bk-vcenter">
                    <h6 class="bk-margin-off">最新运维动态</h6>
                </div>
                <div class="col-xs-4 bk-vcenter text-right">
                </div>
            </div>
        </div>

        <div class="tab-content">
            <div class="table-responsive">
                <table class="table table-hover" style="text-align: center">
                    <thead>
                        <tr>
                            <th style="width: 20%; text-align: center">记录时间</th>
                             <th style="width: 55%; text-align: left">记录概要</th>
                            <th style="width: 25%; text-align: left">项目名称</th>
                           
                        </tr>
                    </thead>
                    <tbody>
                        @{
                            List<DepartmentWork.Model.NewInfoModel> listOfMaintenanceInfo = (List<DepartmentWork.Model.NewInfoModel>)ViewBag.ListOfMaintenanceInfo;
                            if (listOfMaintenanceInfo.Count != 0)
                            {
                                for (int i = 0; i < listOfMaintenanceInfo.Count; i++)
                                {
                                    var item = listOfMaintenanceInfo[i];
                                    <tr>
                                        <td style="color: black">@item.CreateTime.ToString("yyyy-MM-dd")</td>
                                         <td style="text-align: left"><a  style="color:cornflowerblue" onclick="get_reacord_id('@item.Info_Id')" data-toggle="modal" data-target="#Compile">@Html.SubString(item.Content)</a></td>
                                        <td style="color: black;text-align: left">@Html.SubString(item.ProjectName)</td>
                                       
                              
                                    </tr>
                                }
                            }
                        }

                    </tbody>
                </table>
            </div>
        </div>

        
    </div>
</div>


<div class="col-md-12 col-xs-12">
    <div class="panel bk-widget bk-border-off bk-noradius">
        <div class="panel-heading bk-bg-primary">
            <div class="row">
                <div class="col-xs-8 text-left bk-vcenter">
                    <h6 class="bk-margin-off">最新科室工作</h6>
                </div>
                <div class="col-xs-4 bk-vcenter text-right">
                </div>
            </div>
        </div>

        <div class="tab-content">
            <div class="table-responsive">
                <table class="table table-hover" style="text-align: center">
                    <thead>
                        <tr>
                            <th style="width: 20%; text-align: center">工作发布时间</th>
                            <th style="width: 80%; text-align: left">工作概要</th>
                        </tr>
                    </thead>
                    <tbody>
                        @{
                            List<DepartmentWork.Model.NewInfoModel> listDeskWorks = (List<DepartmentWork.Model.NewInfoModel>)ViewBag.ListDeskWorks;
                            if (listDeskWorks.Count != 0)
                            {
                                for (int i = 0; i < listDeskWorks.Count; i++)
                                {
                                    var item = listDeskWorks[i];
                            <tr>
                                <td style="color: black">@item.CreateTime.ToString("yyyy-MM-dd")</td>
                              
                               <td style="text-align: left"><a style="color:cornflowerblue;" onclick="ShowWorkModal('@item.Info_Id')" data-toggle="modal" data-target="#work_C">@Html.SubString(item.ProjectName)</a></td>
                            </tr>
                                }
                            }
                        }

                    </tbody>
                </table>
            </div>
        </div>

        
    </div>
</div>














<!-- 项目管理工作记录 模态框（Modal） -->
<script>
    function ShowWorkReocredInfoModal(workReocredId)
    {
        //alert(data["Status"]);
        $.ajax({
            type: "POST",
            url: "/ProjectManageArea/WorkReocred/GetWorkReocredInfo",
            data: "workReocredId=" + workReocredId,
            error: function () { alert("服务器出错！"); },
            success: function (data)
            {
                // $("#TaskBookInfoModal").attr("aria-hidden", "true");
                $("#lb_WorkReocredTitle").text(data["PROJECT_WORKRECORD_TITLE"]);
                $("#lb_WorkReocredCreater").text(data["PROJECT_WORKRECORD_CREATERNAME"]);

                //$("#lb_WorkReocredContent").text(data["PROJECT_WORKRECORD_CONTENT"]);
                var content = "";
                for (var i = 0; i < data["PROJECT_WORKRECORD_CONTENT"].length; i++)
                {
                    if (i % 20 == 0 && i != 0)
                    {
                        content += data["PROJECT_WORKRECORD_CONTENT"][i] + "<br/>";
                    } else
                    {
                        content += data["PROJECT_WORKRECORD_CONTENT"][i];
                    }

                }
                $("#lb_WorkReocredContent").html(content);
                if (data["LEVEL"] == 0)
                {
                    $("#lb_WorkReocredLevel").text("普通");
                } else
                {
                    $("#lb_WorkReocredLevel").text("重要");
                }


            }
        });
    }
</script>

<div class="modal fade" id="WorkReocredInfoModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">工作记录详情
                </h4>
            </div>
            <div class="modal-body" style="font-size: small">
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">工作记录主题：</label>
                    <div class="col-md-9">
                        <label id="lb_WorkReocredTitle" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">工作记录创建人：</label>
                    <div class="col-md-9">
                        <label id="lb_WorkReocredCreater" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">工作记录内容：</label>
                    <div class="col-md-9">
                        <label id="lb_WorkReocredContent" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">工作记录级别：</label>
                    <div class="col-md-9">
                        <label id="lb_WorkReocredLevel" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    关闭
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>



<!-- BUG详情 模态框（Modal） -->

<script>
    function ShowBugInfoModal(bugId)
    {
        //alert(data["Status"]);
        $.ajax({
            type: "POST",
            url: "/DevelopArea/Bug/GetBugInfo",
            data: "bugId=" + bugId,
            error: function () { alert("服务器出错！"); },
            success: function (data)
            {
                // $("#TaskBookInfoModal").attr("aria-hidden", "true");
                $("#lb_BugName").text(data["BugName"]);
                $("#lb_BugCreater").text(data["Creater"]);
                $("#lb_BugHandToUser").text(data["HandToUser"]);

                var content = "";
                for (var i = 0; i < data["BugContext"].length; i++)
                {
                    if (i % 35 == 0 && i != 0)
                    {
                        content += data["BugContext"][i] + "<br/>";
                    } else
                    {
                        content += data["BugContext"][i];
                    }

                }
                $("#lb_BugContext").html(content);


                $("#lb_BugDeadTime").text(data["BugDeadTime"]);
                //$("#lb_BugHour").text(data["Hour"]);
                if (data["Status"] == 0)
                {
                    $("#lb_BugStatus").text('任务进行中');
                }
                else if (data["Status"] == 1)
                {
                    $("#lb_BugStatus").text('任务进行中但任务超时');
                }
                else if (data["Status"] == 2)
                {
                    $("#lb_BugStatus").text('任务完成');
                }
                else if (data["Status"] == 3)
                {
                    $("#lb_BugStatus").text('任务超时完成');
                }

                if (data["Level"] == 0)
                {
                    $("#lb_BugLevel").text('低');
                }
                else if (data["Level"] == 1)
                {
                    $("#lb_BugLevel").text('中');
                }
                else if (data["Level"] == 2)
                {
                    $("#lb_BugLevel").text('高');
                }

                if (data["BugFileSaveName"] == "")
                {
                    //$("#lb_BugFile").text("");
                    $("#a_DownloadBugFile").text("");
                } else
                {
                    //$("#lb_BugFile").text(data["BugFileShowName"]);
                    $("#a_DownloadBugFile").text(data["BugFileShowName"]);
                    //$("#a_DownloadBugFile").attr("href", "http:////" + data["BugFilePath"] + '//' + data["BugFileSaveName"]);
                    $("#a_DownloadBugFile").attr("href", '@Url.Content("~/Home/DownLoadFile?filePath=")' + data["BugFileSaveName"] + "&type=Bug&fileName=" + data["BugFileSaveName"]);
                }

            }
        });
    }

</script>

<div class="modal fade" id="BugInfoModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">BUG详情
                </h4>
            </div>
            <div class="modal-body" style="font-size: small">
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">BUG名称：</label>
                    <div class="col-md-9">
                        <label id="lb_BugName" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">创建人：</label>
                    <div class="col-md-9">
                        <label id="lb_BugCreater" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">BUG处理人：</label>
                    <div class="col-md-9">
                        <label id="lb_BugHandToUser" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">BUG详情：</label>
                    <div class="col-md-9">
                        <label id="lb_BugContext" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">BUG级别：</label>
                    <div class="col-md-9">
                        <label id="lb_BugLevel" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">BUG截止日期：</label>
                    <div class="col-md-9">
                        <label id="lb_BugDeadTime" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">BUG状态：</label>
                    <div class="col-md-9">
                        <label id="lb_BugStatus" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">BUG附件：</label>
                    <div class="col-md-9">
                        <a id="a_DownloadBugFile">
                            <label id="lb_BugFile" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                        </a>
                    </div>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    关闭
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>



<!-- 任务详情 模态框（Modal） -->

<script>
    function ShowTaskInfoModal(taskId)
    {
        //alert(data["Status"]);
        $.ajax({
            type: "POST",
            url: "/DevelopArea/Task/GetTaskInfo",
            data: "taskId=" + taskId,
            error: function () { alert("服务器出错！"); },
            success: function (data)
            {
                // $("#TaskBookInfoModal").attr("aria-hidden", "true");
                $("#lb_TaskName").text(data["TaskName"]);
                $("#lb_TaskCreater").text(data["Creater"]);
                $("#lb_TaskHandToUser").text(data["HandToUser"]);


                var content = "";
                for (var i = 0; i < data["TaskContext"].length; i++)
                {
                    if (i % 35 == 0 && i != 0)
                    {
                        content += data["TaskContext"][i] + "<br/>";
                    } else
                    {
                        content += data["TaskContext"][i];
                    }

                }
                $("#lb_TaskContext").html(content);


                $("#lb_TaskCreateTime").text(data["TaskCreateTime"]);
                $("#lb_TaskHour").text(data["Hour"]);
                if (data["Status"] == 0)
                {
                    $("#lb_TaskStatus").text('任务进行中');
                }
                else if (data["Status"] == 1)
                {
                    $("#lb_TaskStatus").text('任务进行中但任务超时');
                }
                else if (data["Status"] == 2)
                {
                    $("#lb_TaskStatus").text('任务完成');
                }
                else if (data["Status"] == 3)
                {
                    $("#lb_TaskStatus").text('任务超时完成');
                }

                if (data["Level"] == 0)
                {
                    $("#lb_TaskLevel").text('低');
                }
                else if (data["Level"] == 1)
                {
                    $("#lb_TaskLevel").text('中');
                }
                else if (data["Level"] == 2)
                {
                    $("#lb_TaskLevel").text('高');
                }

                if (data["TaskBookFileSaveName"] == "")
                {
                    //$("#lb_TaskFile").text("");
                    $("#a_DownloadTaskFile").text("");
                } else
                {
                    //$("#lb_TaskFile").text(data["TaskFileShowName"]);
                    $("#a_DownloadTaskFile").text(data["TaskFileShowName"]);
                    //$("#a_DownloadTaskFile").attr("href", "http:////" + data["TaskFilePath"] + '//' + data["TaskFileSaveName"]);
                    $("#a_DownloadTaskFile").attr("href", '@Url.Content("~/Home/DownLoadFile?filePath=")' + data["TaskFileSaveName"] + "&type=Task&fileName=" + data["TaskFileSaveName"]);

                }

            }
        });
    }

</script>

<div class="modal fade" id="TaskInfoModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">任务详情
                </h4>
            </div>
            <div class="modal-body" style="font-size: small">
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">任务名称：</label>
                    <div class="col-md-9">
                        <label id="lb_TaskName" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">创建人：</label>
                    <div class="col-md-9">
                        <label id="lb_TaskCreater" style="width: 100%" class="col-md-8 control-label" for="text-input">任务01</label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">任务分配人：</label>
                    <div class="col-md-9">
                        <label id="lb_TaskHandToUser" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">任务级别：</label>
                    <div class="col-md-9">
                        <label id="lb_TaskLevel" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">任务状态：</label>
                    <div class="col-md-9">
                        <label id="lb_TaskStatus" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">任务详情：</label>
                    <div class="col-md-9">
                        <label id="lb_TaskContext" style="width: 100%" class="col-md-8 control-label" for="text-input">任务书01</label>
                    </div>
                </div>

                <hr />


                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">任务所需时间：</label>
                    <div class="col-md-9">
                        <label id="lb_TaskHour" class="col-md-8 control-label"></label>
                    </div>
                </div>
                <br />
                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">任务创建时间：</label>
                    <div class="col-md-9">
                        <label id="lb_TaskCreateTime" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">任务附件：</label>
                    <div class="col-md-9">
                        <a id="a_DownloadTaskFile">
                            @* <label  id="lb_TaskFile"  class="col-md-8 control-label" for="text-input"></label>*@
                        </a>
                    </div>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    关闭
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>




<!-- 科室工作 模态框（Modal） -->
<script>
    function ShowWorkModal(bugId)
    {
        $.ajax({
            type: "POST",
            url: "/QueryArea/Query/WorkSeclet",
            data: "roleId=" + bugId,
            error: function () { alert("服务器出错！"); },
            success: function (data)
            {

                $("#work_name").text(data["DESKWORK_NAME"]);
                $("#work_fuzeren").text(data["DESKWORK_PRINCIPAL"]);
                $("#work_faburen").text(data["DESKWORK_FOUNDER"]);
                $("#textarea_work").text(data["DESKWORK_DESCRIBE"]);
            }
        });
    }
</script>
<div class="modal fade" id="work_C" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times; </button>
                <h4 class="modal-title">目标来源：科室工作</h4>
            </div>
            <div class="modal-body" style="font-size: small">
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">工作名称：</label>
                    <div class="col-md-9">
                        <label id="work_name" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">负责人：</label>
                    <div class="col-md-9">
                        <label id="work_fuzeren" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">发布人：</label>
                    <div class="col-md-9">
                        <label id="work_faburen" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">工作内容描述：</label>
                    <div class="col-md-9">
                        <label id="textarea_work" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />


            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    关闭
                </button>
            </div>
        </div>

    </div>

</div>


<!-- 运维工作 模态框（Modal） -->
<script>
    function appopsid(bugId)
    {
        $.ajax({
            type: "POST",
            url: "/QueryArea/Query/AppopsSeclet",
            data: "roleId=" + bugId,
            error: function () { alert("服务器出错！"); },
            success: function (data)
            {

                $("#appops_name").text(data["appops_name"]);
                $("#appops_workrank").text(data["appops_workrank"]);
                $("#appops_rank").text(data["appops_rank"]);
                $("#appops_WorkLeader").text(data["appops_founder"]);
                $("#appops_department").text(data["appops_department"]);
                $("#appops_yewuleixing").text(data["appops_businesslinkman"]);
                $("#appops_businesstype").text(data["appops_businesstype"]);
                $("#appops_quantity").text(data["appops_quantity"]);
                $("#appops_frequency").text(data["appops_frequency"]);
                $("#appops_relevancename").text(data["appops_relevancename"]);
                $("#appops_relevanceway").text(data["appops_relevanceway"]);
                $("#appops_describe").text(data["appops_describe"]);
            }
        });
    }
</script>
<div class="modal fade" id="appops_C" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times; </button>
                <h4 class="modal-title">目标来源：运维项目</h4>
            </div>
            <div class="modal-body" style="font-size: small">
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">运维项目名称：</label>
                    <div class="col-md-9">
                        <label id="appops_name" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">关级/署级：：</label>
                    <div class="col-md-9">
                        <label id="appops_workrank" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>
                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">项目级别：：</label>
                    <div class="col-md-9">
                        <label id="appops_rank" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />

                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">项目负责人：</label>
                    <div class="col-md-9">
                        <label id="appops_WorkLeader" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">业务主管部门：</label>
                    <div class="col-md-9">
                        <label id="appops_department" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">业务类型：</label>
                    <div class="col-md-9">
                        <label id="appops_yewuleixing" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">用户人数：</label>
                    <div class="col-md-9">
                        <label id="appops_quantity" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">使用频率：</label>
                    <div class="col-md-9">
                        <label id="appops_frequency" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">关联系统名称：</label>
                    <div class="col-md-9">
                        <label id="appops_relevancename" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">系统关联方式：</label>
                    <div class="col-md-9">
                        <label id="appops_relevanceway" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />
                <div class="row">
                    <label class="col-md-3 control-label" for="text-input">功能描述：</label>
                    <div class="col-md-9">
                        <label id="appops_describe" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                    </div>
                </div>

                <hr />

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    关闭
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>



<!-- 运维记录 模态框（Modal） -->
<script>
    function get_reacord_id(bugId) {

        $.ajax({
            type: "POST",
            url: "/PerationAndMaintenanceArea/Maintenance/reacordUpdat",
            data: "roleId=" + bugId,
            error: function () { alert("服务器出错！"); },
            success: function (data) {
                $("#t_record_name").text(data["record_name"]);
                $("#t_record_operationtype").text(data["record_operationtype"]);

                $("#t_record_content").val(data["record_content"]);
                var content = "";
                for (var i = 0; i < data["record_content"].length; i++) {
                    if (i % 20 == 0 && i != 0) {
                        content += data["record_content"][i] + "<br/>";
                    } else {
                        content += data["record_content"][i];
                    }

                }
                $("#t_record_content").html(content);

                
            }
        });
    }

</script>
<div class="modal fade" id="Compile" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabell">运维记录</h4>
            </div>
            <form enctype="multipart/form-data" action="@Url.Action("Reacord_updat", "Maintenance", new { area = "PerationAndMaintenanceArea" })" method="POST" >

                <div class="modal-body">
                    <input type="hidden" name="hid_ProjectId" />
                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">记录人姓名：</label>
                        <div class="col-md-9">
                            <label id="t_record_name" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">运维操作类型：</label>
                        <div class="col-md-9">
                           <label id="t_record_operationtype" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">运维记录内容：</label>
                        <div class="col-md-9">
                               <label id="t_record_content" style="width: 100%" class="col-md-3 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                </div>

            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>






<!-- 加班 模态框（Modal） -->
<script>
    function getid(bugId)
    {
        $.ajax({
            type: "POST",
            url: "/DepartmentArea/Overtime/OvertimeUpdat",
            data: "roleId=" + bugId,
            error: function () { alert("服务器出错！"); },
            success: function (data)
            {
                $("#worktime_cause").text(data["worktime_cause"]);
                $("#worktime_duration").text(data["worktime_duration"]);
                $("#compile_worktime_name").text(data["worktime_name"]);
                $("#compile_worktime_day").text(data["worktime_day"]);
                $("#compile_worktime_time_time").text(data["worktime_time_time"]);


            }
        });
    }
</script>


<div class="modal fade" id="worktime_C" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <form id="overtime_id" action="@Url.Action("updat_worktime", "Overtime", new { area = "DepartmentArea" })" method="POST">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">加班申请</h4>
                </div>
                <div id="div_CreateProject" class="modal-body">
                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">申请人:</label>
                        <div class="col-md-9">
                            <label id="compile_worktime_name" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label">加班日期：</label>
                        <div class="col-md-9">
                            <label id="compile_worktime_day" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>

                        </div>
                    </div>
                    <br />
                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">加班时间:</label>
                        <div class="col-md-9" style="height: 100%">
                            <label id="compile_worktime_time_time" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">加班事由：</label>
                        <div class="col-md-9">
                            <label id="worktime_cause" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />


                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                </div>
            </form>
        </div>

    </div>
</div>




<!-- 请假 模态框（Modal） -->
<script>
    function leaveid(bugId)
    {
        $.ajax({
            type: "POST",
            url: "/DepartmentArea/Leave/LeaveUpdat",
            data: "roleId=" + bugId,
            error: function () { alert("服务器出错！"); },
            success: function (data)
            {
                $("#Q_leave_name").text(data["leave_name"]);
                $("#Q_leave_day").text(data["leave_day"]);
                $("#Q_day").text(data["leave_howmanydays"]);
                $("#Q_leave_classes").text(data["leave_classes"]);
                $("#Q_leave_cause").text(data["leave_cause"]);


            }
        });
    }
</script>


<div class="modal fade" id="leave_C" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <form id="Q_overtime_id" action="@Url.Action("updat_worktime", "Overtime", new { area = "DepartmentArea" })" method="POST">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabelQ">请假申请</h4>
                </div>
                <div id="div_CreateProjectQ" class="modal-body">
                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">申请人:</label>
                        <div class="col-md-9">
                            <label id="Q_leave_name" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label">请假起止日期：</label>
                        <div class="col-md-9">
                            <label id="Q_leave_day" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>

                        </div>
                    </div>


                    <br />
                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">请假天数:</label>
                        <div class="col-md-9" style="height: 100%">
                            <label id="Q_day" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />
                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">请假类别:</label>
                        <div class="col-md-9" style="height: 100%">
                            <label id="Q_leave_classes" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">请假事由：</label>
                        <div class="col-md-9">
                            <label id="Q_leave_cause" style="width: 100%" class="col-md-8 control-label" for="text-input"></label>
                        </div>
                    </div>
                    <br />

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                </div>
            </form>
        </div>

    </div>
</div>








<!-- 获取百度地图 -->
@*<script type="text/javascript">

    //创建和初始化地图函数：
    function initMap() {
        createMap();//创建地图
        setMapEvent();//设置地图事件
        addMapControl();//向地图添加控件

    }

    function getLocation() {
        if (navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(showPosition);
        }
        else {
            x.innerHTML = "Geolocation is not supported by this browser.";
        }
    }

    function showPosition(position) {
        $('#hid_Latitude').val(position.coords.latitude);
        $('#hid_Longitude').val(position.coords.longitude);
        var point = new BMap.Point(position.coords.longitude, position.coords.latitude)
    }

    //创建地图函数：
    function createMap() {

        var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
        //var point = new BMap.Point(116.395645, 39.929986);//定义一个中心点坐标
        //alert(document.getElementById('hid_Longitude').value, document.getElementById('hid_Latitude').value);
        var point = new BMap.Point( document.getElementById('hid_Longitude').value,document.getElementById('hid_Latitude').value);//定义一个中心点坐标

        map.centerAndZoom(point, 12);//设定地图的中心点和坐标并将地图显示在地图容器中
        window.map = map;//将map变量存储在全局

    }

    //地图事件设置函数：
    function setMapEvent() {
        map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
        map.enableScrollWheelZoom();//启用地图滚轮放大缩小
        map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
        map.enableKeyboard();//启用键盘上下左右键移动地图
    }

    //地图控件添加函数：
    function addMapControl() {
        //向地图中添加缩放控件
        var ctrl_nav = new BMap.NavigationControl({ anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE });
        map.addControl(ctrl_nav);
        //向地图中添加缩略图控件
        var ctrl_ove = new BMap.OverviewMapControl({ anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 1 });
        map.addControl(ctrl_ove);
        //向地图中添加比例尺控件
        var ctrl_sca = new BMap.ScaleControl({ anchor: BMAP_ANCHOR_BOTTOM_LEFT });
        map.addControl(ctrl_sca);
    }
    getLocation();
    //initMap();//创建和初始化地图

    setTimeout(function () { initMap(); }, 2000);

</script>*@
<!-- 获取百度地图 -->
